package com.Test;

/**
 * @author ：Fmc
 * @date ：Created in 2022/6/14 8:56
 * @description：
 * @modified By：
 * @version:
 */
public class Person {
    private int id;
    private String name;


    public int clac(int a,int b,String type){
        int number=0;
        switch (type){
            case "加":
                number = a + b;
                break;
            case "减":
                number = a - b;
                break;
            case "乘":
                number = a * b;
                break;
            case "除":
                number = a / b;
                break;
            default:break;
        }
        return number;
    }



    @Override
    public String toString() {
        return "Person{" +
                "id=" + id +
                ", name='" + name + '\'' +
                '}';
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Person() {
    }

    public Person(int id, String name) {
        this.id = id;
        this.name = name;
    }
}
